package com.hucheng.user.provider.controller;

import com.hucheng.common.exception.EduException;
import com.hucheng.common.result.ReturnVO;
import com.hucheng.user.api.query.UserQuery;
import com.hucheng.user.api.vo.UserVO;
import com.hucheng.user.provider.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 凉白开不加冰
 * @Version: 0.0.1V
 * @Date: 2019-06-13
 * @Description: 用户Controller
 **/
@RequestMapping("user")
@RestController
public class UserController {

    @Autowired
    private UserService userService;

    @PostMapping("findUserByName")
    public UserVO findUserByName(UserQuery userQuery) throws EduException {
        return userService.findUserByName(userQuery);
    }
}
